package ch.netcetera.planningpoker.server.model;

import java.util.Date;

import ch.netcetera.planningpoker.shared.RoundStatus;

import com.googlecode.objectify.Key;


public class Round extends DatastoreObject {

    private String title;

    private Key<Game> game;
    
    private RoundStatus status;
    
    private Date createdDate;

    public Round() {

    }
    
    public Round(String title, Key<Game> game) {
        this.title = title;
        this.game = game;
        this.status = RoundStatus.Open;
        this.createdDate = new Date();
    }

    public Round(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Key<Game> getGame() {
        return game;
    }
    
    public Long getGameId() {
        return game.getId();
    }

    public void setGame(Key<Game> game) {
        this.game = game;
    }

    public void setStatus(RoundStatus status) {
        this.status = status;
    }
    
    public RoundStatus getStatus() {
        return status;
    }
    
    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date date) {
        this.createdDate = date;
    }

}
